package com.example.yurpceasy.fault.tolerant;

import com.example.yurpceasy.model.RpcResponse;

import java.util.Map;

/**
 * 快速失败容错机制：遇到异常后，直接将异常抛出，交给上层处理
 */
public class FailFastTolerantStrategy implements TolerantStrategy {
    @Override
    public RpcResponse doTolerant(Map<String, Object> context, Exception e) {
        throw new RuntimeException("启用快速失败容错机制，服务错误", e);
    }
}
